~function (prototype) {
  function bind(context = global, ...outerArgs) {
    return (...innerArgs) => {
      return this.call(context, ...outerArgs, ...innerArgs);
    }
  }
  prototype.bind = bind;
}(Function.prototype);

function sum(...args) {
  return this.prefix + args.reduce((acc, curr) => acc + curr, 0);
}
let obj = { prefix: '$' };
let bindSum = sum.bind(obj, 1, 2, 3);
console.log(bindSum(4, 5));
